#define _CRT_SECURE_NO_WARNINGS
#include "List.h"


void test1()
{
	LTNode* plist = LTInit();

	LTPushFront(plist, 1);
	LTPushFront(plist, 2);
	LTPopFront(plist);
	LTPrint(plist);

	LTPushFront(plist, 3);
	LTPushFront(plist, 4);
	LTPopBack(plist);
	LTPrint(plist);

	LTPopBack(plist);
	LTPopBack(plist);
	LTPrint(plist);

	LTDestroy(plist);
	plist = NULL;
}


void test2()
{
	LTNode* plist = LTInit();

	LTPushBack(plist, 1);
	LTPushBack(plist, 2);
	LTPushBack(plist, 3);
	LTPushBack(plist, 4);
	LTPrint(plist);

	LTNode* pos = LTFind(plist, 3);
	{
		if (pos)
		{
			LTInsert(pos, 30);
		}
	}
	LTErase(pos);
	LTPrint(plist);

	LTDestroy(plist);
	plist = NULL;
}

int main()
{
	test2();
	return 0;
}
